package cn.burnit.pojo;

import java.util.Date;

/**
 * 借阅类
 */
public class Borrow {
    private int id;//id
    private String  bookId;//书籍id
    private int readerId;//借阅者id
    private Date borrowDate;//借阅时间
    private Date backDate;//最迟返还时间
    private Date latelyDate;//中途返还时间
    private String if_back;//是否归还


    public Borrow() {
    }

    public Borrow(int id, String bookId, int readerId, Date borrowDate, Date backDate,Date latelyDate, String if_back) {
        this.id = id;
        this.bookId = bookId;
        this.readerId = readerId;
        this.borrowDate = borrowDate;
        this.backDate = backDate;
        this.latelyDate=latelyDate;
        this.if_back = if_back;
    }

    public Borrow(String bookId, int readerId, Date borrowDate, Date newDate, String if_back) {
        this.bookId=bookId;
        this.readerId=readerId;
        this.borrowDate=borrowDate;
        this.backDate=newDate;
        this.if_back=if_back;
    }

    public Borrow(String bookId, int readerId, Date latelyDate, String if_back) {
        this.bookId=bookId;
        this.readerId=readerId;
        this.latelyDate=latelyDate;
        this.if_back=if_back;
    }

    public Borrow(String bookId, int readerId, String if_back) {
        this.bookId=bookId;
        this.readerId=readerId;
        this.if_back=if_back;
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public int getReaderId() {
        return readerId;
    }

    public void setReaderId(int readerId) {
        this.readerId = readerId;
    }

    public Date getBorrowDate() {
        return borrowDate;
    }

    public void setBorrowDate(Date borrowDate) {
        this.borrowDate = borrowDate;
    }

    public Date getBackDate() {
        return backDate;
    }

    public void setBackDate(Date backDate) {
        this.backDate = backDate;
    }

    public String getIf_back() {
        return if_back;
    }

    public void setIf_back(String if_back) {
        this.if_back = if_back;
    }

    public Date getLatelyDate() {
        return latelyDate;
    }

    public void setLatelyDate(Date latelyDate) {
        this.latelyDate = latelyDate;
    }

    @Override
    public String toString() {
        return "Borrow{" +
                "id=" + id +
                ", bookId='" + bookId + '\'' +
                ", readerId=" + readerId +
                ", borrowDate=" + borrowDate +
                ", backDate=" + backDate +
                ", latelyDate=" + latelyDate +
                ", if_back='" + if_back + '\'' +
                '}';
    }
}
